<?php
/**
 * Created by PhpStorm.
 * User: liuhong
 * Date: 2019-04-12
 * Time: 19:49
 */

namespace app\service;


use app\common\model\ChatCustomerMsg;
use app\common\model\User as UserModel;

use think\Db;
use think\Exception;

class CustomerService extends ThirdService
{
    public $customerMsgModel;



    //构造函数
    public function __construct($option = false)
    {
        parent::__construct($option);
        $this->customerMsgModel = new ChatCustomerMsg();
    }

    /**
     * 列表
     * @param $where
     * @param int $page
     * @param int $page_num
     * @return array|bool
     */
    public function queryPage($where, $page = 1, $page_num = 20)
    {
        try {
            return $this->customerMsgModel->where($where)->page($page,$page_num)->order('id desc')->select()->toArray();
        } catch (Exception $ex) {
            LogService::S()->writeLog('Exception', 'ChatCustomerMsg/querypage', $ex->getMessage());
            return false;
        }
    }


}